package com.getui.java.query;

import com.getui.java.COMM;
import com.gexin.rp.sdk.base.IPushResult;
import com.gexin.rp.sdk.http.IGtPush;

public class GetPushMessageResultDemo {
	private static final String TASKID = "OSA-1208_Srx8i5LeU09VHHGb8VYJx8";

	public static void main(String[] args) {

		IGtPush push = new IGtPush(COMM.host, COMM.appKey, COMM.masterSecret);
		IPushResult result = push.getPushResult(TASKID);
		System.out.println(result.getResponse());
		String msgTotal = result.getResponse().get("msgTotal").toString();
		String clickNum = result.getResponse().get("clickNum").toString();
		String msgProcess = result.getResponse().get("msgProcess").toString();
		System.out.println("总下发数:" + msgTotal + "|点击数:" + clickNum + "|下发的消息总数:" + msgProcess);
		// {result=ok, msgTotal=1, clickNum=0, pushNum=0,
		// taskId=OSA-1208_Srx8i5LeU09VHHGb8VYJx8, msgProcess=0}
	}

}